package com.sena.engine.snmp.builder;

import com.sena.engine.snmp.api.SenaSnmpApi;
import com.sena.engine.snmp.api.SenaSnmpApiImp;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.Serializable;

/**
 * @author seven
 * @create 2021-11-24 20:22
 **/
public class SnmpApiBuilder implements Serializable {



    private volatile static SenaSnmpApi snmpApi;

    /**
     *
     * @return
     */
    public static SenaSnmpApi buildSnmpApi(){
        if (snmpApi == null) {
            synchronized (SnmpApiBuilder.class) {
                if (snmpApi == null) {
                    snmpApi = new SenaSnmpApiImp();
                }
            }
        }
        return snmpApi;
    }


}
